package com.whmall.service.crm.provider;

import com.whmall.component.entity.dto.OperatorReqDTO;
import com.whmall.component.entity.dto.PageReqDTO;
import com.whmall.component.entity.dto.PageRspDTO;
import com.whmall.service.crm.api.CustomerPoolFollowRecordApi;
import com.whmall.service.crm.entity.dto.customerpool.CustomerPoolFollowRecordCreateDTO;
import com.whmall.service.crm.entity.dto.customerpool.CustomerPoolFollowRecordQueryDTO;
import com.whmall.service.crm.entity.dto.customerpool.CustomerPoolFollowRecordRspDTO;
import com.whmall.service.crm.entity.dto.customerpool.CustomerPoolFollowRecordUpdateDTO;
import com.whmall.service.crm.module.customerpool.service.CustomerPoolFollowRecordService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService(interfaceClass = CustomerPoolFollowRecordApi.class)
public class CustomerPoolFollowRecordProvider implements CustomerPoolFollowRecordApi{

    @Autowired
    private CustomerPoolFollowRecordService customerPoolFollowRecordService;

    @Override
    public PageRspDTO<CustomerPoolFollowRecordRspDTO> page(PageReqDTO pageReqDTO, CustomerPoolFollowRecordQueryDTO queryReqDTO) {
        return customerPoolFollowRecordService.page(pageReqDTO,queryReqDTO);
    }

    @Override
    public List<CustomerPoolFollowRecordRspDTO> list(CustomerPoolFollowRecordQueryDTO condition) {
        return customerPoolFollowRecordService.list(condition);
    }

    @Override
    public PageRspDTO<CustomerPoolFollowRecordRspDTO> groupByCompanyIdWithTraderId(PageReqDTO pageReqDTO, CustomerPoolFollowRecordQueryDTO condition) {
        return customerPoolFollowRecordService.groupByCompanyIdWithTraderId(pageReqDTO, condition);
    }

    @Override
    public void save(CustomerPoolFollowRecordCreateDTO reqDTO, OperatorReqDTO operatorReqDTO) {
        customerPoolFollowRecordService.save(reqDTO,operatorReqDTO);
    }

    @Override
    public void update(CustomerPoolFollowRecordUpdateDTO reqDTO, OperatorReqDTO operatorReqDTO) {
        customerPoolFollowRecordService.update(reqDTO,operatorReqDTO);
    }
}